<!DOCTYPE HTML>
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <link rel="stylesheet" href="../css/currency/bootstrap.css"/>
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css"/>
    <link href="../css/style.css" rel="stylesheet" type="text/css"/>
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="../css/recipe.css"/>
    <style>.exp {
        float: left;
        width: 300px;
    }</style>
    <title>微信商户管理</title>
</head>
<body>
<nav class="breadcrumb" style="margin-bottom:0px"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span
        class="c-gray en">&gt;</span> 微信商户 <span class="c-gray en">&gt;</span>微信商户管理列表
    <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pd-20" id="storeRecord">
    <div class="text-c" id="storeRecordList">
        <div id="storeHead">
        <form search-form>
            <input type="text" class="input-text" id="keyword" style="width:200px" placeholder="设备编号"
                   v-model="condition.key">
            <input id="hiddenText" type="text" style="display:none" class="input-text">
            <span class="select-box" style="width:150px;">
                    <select id="bindStatus" class="select" v-model="condition.bindStatus">
                        <option value="">-请选择状态-</option>
                        <option value="0">未绑定</option>
                        <option value="1">已绑定</option>
                        <option value="2">已解绑</option>
                        <option value="3">已再次绑定</option>
                    </select>
                </span>
            <div id="selectBtnEnter" class="btn btn-primary" v-on:click="getList('search')">查询
            </div>
        </form>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
	        <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="addButton" v-on:click="importPostion">导入商户申请表</a></span>
            <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="pullOutBtn" v-on:click="updateStatus('2')">解绑</a></span>
            <span class="l mr-5"><a class="btn btn-primary radius addFormula" id="pullOutBtn1" v-on:click="updateStatus('1')">绑定</a></span>
            <span class="r" v-cloak>共有数据：{{pageInfo.total}}条</span>
        </div>
        </div>

        <form>
            <table class="table table-border table-bordered table-bg" id="store">
                <thead>
                <tr class="text-c">
                    <!--TODO 生成表头-->
                    <td><input type="checkbox" id="all" value="全选" v-model="condition.all" @click="checkAll"></td>
                    <th nowrap="nowrap" width='9.091%'>设备编号</th>
                    <th nowrap="nowrap" width='9.091%'>服务商APPID</th>
                    <th nowrap="nowrap" width='9.091%'>商户APPID</th>
                    <th nowrap="nowrap" width='9.091%'>商户号</th>
                    <th nowrap="nowrap" width='9.091%'>服务商商户号</th>
                    <th nowrap="nowrap" width='9.091%'>所属行业</th>
                    <th nowrap="nowrap">商户名</th>
                    <th nowrap="nowrap">商户全称</th>
                    <th nowrap="nowrap">服务商全称</th>
                    <th nowrap="nowrap">申请时间</th>
                    <th nowrap="nowrap">商户绑定状态</th>
                    <th nowrap="nowrap" width='9.091%'>操作</th>
                </tr>
                </thead>
                <tbody v-cloak>
                <tr class="text-c" v-for="(item,index) in pageInfo.list">
                    <td><input type="checkbox" :value="item.equipmentCode" v-model="condition.items" name="id"></td>
                    <td nowrap="nowrap">{{item.equipmentCode}}</td>
                    <td nowrap="nowrap">{{item.appId}}</td>
                    <td nowrap="nowrap">{{item.subAppId}}</td>
                    <td nowrap="nowrap">{{item.subMchId}}</td>
                    <td nowrap="nowrap">{{item.mchId}}</td>
                    <td nowrap="nowrap">{{item.industry}}</td>
                    <td nowrap="nowrap">{{item.mchName}}</td>
                    <td nowrap="nowrap">{{item.mchFullName}}</td>
                    <td nowrap="nowrap">{{item.subMchFullName}}</td>
                    <td nowrap="nowrap">{{item.applyTime}}</td>
                    <td nowrap="nowrap">
                        <span style="color: #1F1F1F" v-if="item.bindStatus=='0'">未绑定</span>
                        <span style="color: #4cd964" v-else-if="item.bindStatus=='1'">已绑定</span>
                        <span style="color: #1F1F1F" v-else-if="item.bindStatus=='2'">已解绑</span>
                        <span style="color: #4cd964" v-else-if="item.bindStatus=='3'">已再次绑定</span>
                    </td>
                    <td nowrap="nowrap">
                        <a class="btn btn-primary radius" @click="updateInit(index)">修改</a>
                        <a class="btn btn-primary radius" @click="del(index)">刪除</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
        <div class="pageBox" v-cloak id="pageBox">
            <div class="pageInfo">显示 <span id="startRow">{{pageInfo.startRow}}</span> 到 <span id="endRow">{{pageInfo.endRow}}条</span>&nbsp;&nbsp;&nbsp;&nbsp;{{pageInfo.pages}}页&nbsp;&nbsp;&nbsp;&nbsp;共
                <span id="total">{{pageInfo.total}}</span> 条
                <select v-model="selectedPageSize" v-on:change="getList('changePageSize')">
                    <option value="5">5</option>
                    <option value="10">10</option>
                    <option value="15">15</option>
                    <option value="20">20</option>
                    <option value="50">50</option>
                </select>
            </div>
            <ul class="pagination" id="pagination"></ul>
        </div>
        <div class="tips" id="noData" align="center" style="display: none">
            无数据
        </div>
    </div>
    <!--TODO 添加、更新弹窗-->
    <form class="form form-horizontal" id="addPanel" style="display: none">
        <table class="table" border='0' width='100%'>
            <tr>
                <td width="30%" align="right" nowrap="nowrap"></td>
                <td width="30%" style="margin-left: 0px"></td>
                <td width="40%"></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">设备编号：</label></td>
                <td><input type="text" class="input-text radius" name="equipmentCode" v-model="equipmentCode" placeholder="设备编号" readonly unselectable="on"/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="equipmentCodeErr!=''" readonly unselectable="on">{{equipmentCodeErr}} </span>
                </td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">商户号：</label></td>
                <td><input type="text" class="input-text radius" name="appId" v-model="appId" placeholder="商户号"/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="appIdErr!=''">{{appIdErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">服务商商户号 ：</label></td>
                <td><input type="text" class="input-text radius" name="subAppId" v-model="subAppId" placeholder="服务商商户号 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="subAppIdErr!=''">{{subAppIdErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">商户ID ：</label></td>
                <td><input type="text" class="input-text radius" name="mchId" v-model="mchId" placeholder="商户ID "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="mchIdErr!=''">{{mchIdErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">服务商商户ID ：</label></td>
                <td><input type="text" class="input-text radius" name="subMchId" v-model="subMchId" placeholder="服务商商户ID"/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="subMchIdErr!=''">{{subMchIdErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">所属行业 ：</label></td>
                <td><input type="text" class="input-text radius" name="industry" v-model="industry" placeholder="所属行业 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="industryErr!=''">{{industryErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">商户名 ：</label></td>
                <td><input type="text" class="input-text radius" name="mchName" v-model="mchName" placeholder="商户名 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo"v-if="mchNameErr!=''">{{mchNameErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">商户全称 ：</label></td>
                <td><input type="text" class="input-text radius" name="mchFullName" v-model="mchFullName" placeholder="商户全称 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="mchFullNameErr!=''">{{mchFullNameErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">服务商全称 ：</label></td>
                <td><input type="text" class="input-text radius" name="subMchFullName" v-model="subMchFullName" placeholder="服务商全称 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="subMchFullNameErr!=''">{{subMchFullNameErr}} </span></td>
            </tr>
            <tr>
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px">申请时间 ：</label></td>
                <td><input type="text" class="input-text radius" name="applyTime" v-model="applyTime" placeholder="申请时间 "/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="applyTimeErr!=''">{{applyTimeErr}} </span></td>
            </tr>
            <tr>
                <td class="text-r"></td>
                <td class="text-c">
                    <a class="btn btn-primary radius" id="addCancel" v-on:click="reset">重置</a>
                    <a class="btn btn-primary radius" id="saveDictType" v-on:click="save">保存</a>
                </td>
                <td></td>
            </tr>
        </table>
    </form>
    <form class="form form-horizontal" id="importPanel" style="display: none" enctype="multipart/form-data"
          method="post">
        <table class="table" border='0' width='100%'>
            <tr>
                <td width="20%" align="right" nowrap="nowrap"></td>
                <td width="40%" style="margin-left: 0px"></td>
                <td width="40%"></td>
            </tr>
            <tr id="t1">
                <td align="right" nowrap="nowrap"><label class="form-label" style="padding:0px"><span class="c-red">*</span>微信商户申请文件：</label></td>
                <td><input type="file" class="input-text radius" name="file" placeholder="请选择导入的数据文件" id="file"/></td>
                <td><span class="Validform_checktip Validform_wrong errorInfo" v-if="fileErr!=''">{{fileErr}}</span></td>
            </tr>
            <tr>
                <td width="100%" class="text-r" colspan="3"><a class="btn btn-primary radius f-l ml-50 " style="width: 180px;" id="" v-on:click="importB">保存</a></td>
            </tr>
            <tr>
                <td colspan="3">
                    <div class="f-l ml-50 errMsg error-msg" style="height: 70px;width: 500px">
                    </div>
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>
<script type="text/javascript" src="../js/common/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="../lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/common/H-ui.js"></script>
<script type="text/javascript" src="../js/common/H-ui.admin.js"></script>
<script type="text/javascript" src="../js/utils/utils.js"></script>
<script type="text/javascript" src="../js/currency/vue.js"></script>
<script type="text/javascript" src="../js/currency/vue-resource.min.js"></script>
<script type="text/javascript" src="../js/currency/base.js"></script>
<script type="text/javascript" src="../js/currency/jqPaginator.js"></script>
<script type="text/javascript" src="../js/wxMchInfo.js"></script>
